<?php

/**
 * This is the model metadata class for table "goods_scenic".
 */
class GoodsScenicMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'goods_scenic';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('scenic_id', 'required'),
			array('uid, goods_id, scenic_id', 'numerical', 'integerOnly'=>true),
			array('ticket_type', 'length', 'max'=>30),
			array('period', 'length', 'max'=>100),
			array('tickets_notice', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, uid, goods_id, scenic_id, ticket_type, tickets_notice, period', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'uid' => '用户',
			'goods_id' => '商品id',
			'scenic_id' => 'Scenic',
			'ticket_type' => '景区门票类型',
			'tickets_notice' => '购票须知',
			'period' => 'Period',
		);
	}
}